using System;

namespace Tiwo.Util
{
    public abstract class GenericType : ITypeSource
    {
        private readonly Type _type;

        protected GenericType(Type type, string friendlyName)
        {
            _type = type;
            FriendlyName = friendlyName;
        }

        protected GenericType(Type type)
            : this(type, type.FullName)
        { }

        public string FriendlyName { get; set; }
        public string Type { get { return _type.AssemblyQualifiedName; } }
    }

    public class LongType : GenericType
    {
        public LongType()
            : base(typeof(long)) { }
    }

    public class IntegerType : GenericType
    {
        public IntegerType()
            : base(typeof(int)) { }
    }

    public class StringType : GenericType
    {
        public StringType()
            : base(typeof(string)) { }
    }
}